home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / game / patch / WHDIGamesH-M.lzh / games / Mig29SovietFighter.lha / Mig-29HD / Install next >
Text File  |  1980-01-02  |  3KB  |  152 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "Mig-29.readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. ;----------------------------
  24. ; Wait for inserting disk
  25. ; IN:  #AD_disk - name of disk
  26. ; OUT: -
  27.  
  28. (procedure P_disk
  29.   (askdisk
  30.     (dest #AD_disk)
  31.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  32.     (help @askdisk-help)
  33.   )
  34. )
  35.  
  36.  
  37. ;****************************
  38.  
  39. (if
  40.   (exists #readme-file)
  41.   (if 
  42.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  43.     ("")
  44.     (run ("SYS:Utilities/More %s" #readme-file))
  45.   )
  46. )
  47.  
  48. (set #program "WHDLoad")
  49. (P_chkrun)
  50.  
  51. (set @default-dest
  52.   (askdir
  53.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  54.     (help @askdir-help)
  55.     (default @default-dest)
  56.     (disk)
  57.   )
  58. )
  59. (set #dest (tackon @default-dest @app-name))
  60. (if
  61.   (exists #dest)
  62.   (
  63.     (set #choice
  64.       (askbool
  65.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  66.         (default 1)
  67.         (choices "Delete" "Skip")
  68.         (help @askbool-help)
  69.       )
  70.     )
  71.     (if
  72.       (= #choice 1)
  73.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  74.     )
  75.   )
  76. )
  77. (makedir #dest
  78.   (help @makedir-help)
  79.   (infos)
  80. )
  81.  
  82. ;----------------------------
  83.  
  84. (copyfiles
  85.   (help @copyfiles-help)
  86.   (source ("%s.slave" @app-name))
  87.   (dest #dest)
  88. )
  89. (if
  90.   (exists ("%s.newicon" @app-name))
  91.   (set #icon
  92.     (askchoice
  93.       (prompt "\nWhich icon do you like to install ?\n")
  94.       (default 0)
  95.       (choices "Normal" "NewIcon")
  96.       (help @askchoice-help)
  97.     )
  98.   )
  99.   (set #icon 0)
  100. )
  101. (select #icon
  102.   (set #icon ("%s.inf" @app-name))
  103.   (set #icon ("%s.newicon" @app-name))
  104. )
  105. (copyfiles
  106.   (help @copyfiles-help)
  107.   (source #icon)
  108.   (newname ("%s.info" @app-name))
  109.   (dest #dest)
  110. )
  111. (if
  112.   (exists #readme-file)
  113.   (copyfiles
  114.     (help @copyfiles-help)
  115.     (source #readme-file)
  116.     (dest #dest)
  117.   )
  118. )
  119. (if
  120.   (exists ("%s.info" #readme-file))
  121.   (copyfiles
  122.     (help @copyfiles-help)
  123.     (source ("%s.info" #readme-file))
  124.     (dest #dest)
  125.   )
  126. )
  127.  
  128. (if
  129.   (= #sub-dir "")
  130.   ("")
  131.   (
  132.     (set #dest (tackon #dest #sub-dir))
  133.     (makedir #dest
  134.       (help @makedir-help)
  135.     )
  136.   )
  137. )
  138.  
  139. ;----------------------------
  140.  
  141. (set #AD_disk " ")
  142. (P_disk)
  143.  
  144. (copyfiles
  145.   (help @copyfiles-help)
  146.   (source ("%s:" #AD_disk))
  147.   (dest #dest)
  148.   (pattern "(test|MIG)")
  149. )
  150.  
  151. (exit)
  152.